package com.megvii.koala.data.comparetor;

import com.megvii.koala.data.bean.CreatureBean;

import java.util.Comparator;

/**
 * Created by linyue on 16/3/10.
 */
public class StartTimeComparator<T extends CreatureBean> implements Comparator<T>
{
    @Override
    public int compare(T lhs, T rhs)
    {
        //long转成int会出问题，所以除了1000变成秒再算。。。误差也不会很大。。。
        return (int) (rhs.start_time / 1000 - lhs.start_time / 1000);
    }
}
